<?php use frontend\models\Order; ?>
<?php use common\helpers\Date; ?>
<style>
    .positioon_list li {
        background: #fff;
        margin-bottom: 0;
        border-top: 1px solid #d2d2d2;
        border-bottom: 1px solid rgba(206, 201, 201, 0.35);
    }
    .create_time {
        background: #fff;
        text-align: left;
        margin-bottom: 10px;
        border-bottom: 1px solid #d2d2d2;
    }
</style>
<?php foreach ($data as $order): ?>
<li class="flex-nowrap">
    <div>
        <p><?= $order->product->name ?></p>
        <?php $riseClass = $order->rise_fall == Order::RISE ? 'up_label_btn' : 'down_label_btn'; ?>
        <?php $riseText = $order->rise_fall == Order::RISE ? '涨' : '跌'; ?>
        <p><?= floatval($order->deposit) ?> <span class="<?= $riseClass ?>"><?= $riseText ?></span></p>
    </div>
    <div>
        <p>建仓价</p>
        <p><?= floatval($order->price) ?></p>
    </div>
    <div>
        <p>到期价</p>
        <p><?= floatval($order->sell_price) ?></p>
    </div>
    <div>
        <p>交易时间</p>
        <p><?= intval($order->stop_profit_point) ?>M</p>
    </div>
    <div>
        <p>盈亏</p>
        <p class="<?php if ($order->profit >= 0): ?>red<?php else: ?>green<?php endif ?>"><?php if ($order->profit > 0): ?>+<?php endif ?><?= $order->profit ?></p>
    </div>
</li>
<div class="create_time">
    下单时间：<?= $order->created_at ?>
</div>
<?php endforeach ?>